package com.hsmpay.mobile.dao.bank.impl;

import com.hsmpay.common.dao.Impl.BaseDaoSupport;
import com.hsmpay.mobile.dao.bank.BankDao;
import com.hsmpay.mobile.pojo.bank.Bank;
import org.springframework.stereotype.Repository;

import java.sql.SQLException;

/**
 * 合作银行 Dao接口实现类
 *
 * @param <Entity>
 * @param <Query>
 * @author 颜铃璋
 *         建立时间：2012-12-13
 */
@Repository("bankDao")
public class BankDaoImpl extends BaseDaoSupport<Bank, Long> implements BankDao<Bank, Long> {
    /**
     * 根据银行名称 查出银行对象
     *
     * @param bankName
     * @return
     * @throws SQLException
     */
    public Bank searchBankByName(String bankName) throws SQLException {
        Bank bank = new Bank();
        bank.setName(bankName);
        return searchEntity(bank);
    }
}
